﻿namespace Engage.Web.Portal.Application.Classes.DaybookTemplates
{
    public class DaybookTemplateField
    {
        protected DaybookTemplateField(Constants.DaybookTemplateFieldKinds fieldKind)
        {
            this.TemplateFieldKind = fieldKind;
        }

        public int DisplayOrder { get; set; }
        public int TemplateID { get; set; }
        public int TemplateEntryID { get; set; }
        public int TemplateFieldsID { get; set; }
        
        public string TemplateFieldKind { get; private set; }

        public void SetSomethingOrOther(int value, string config)
        {
            if (config == "test")
                TemplateEntryID = value;
            else if (!String.IsNullOrEmpty(config))
                TemplateEntryID = 1;
            else
                TemplateEntryID = -1;
        }
    }
}